import http from '@/utils/request'
import { base } from '@/config'
const baseUrl = base.user + '/user'

// 用户模块
const user = {
  // 用户数据统计
  statistics() {
    return http.get(`${base.user}/statistics/user`)
  },

  // 获取用户列表
  getList: params => {
    return http.get(`${baseUrl}/list`, params)
  },

  // 获取用户信息
  getUserInfo: id => {
    return http.get(`${baseUrl}/infoById/${id}`)
  },

  // 获取用户下拉列表
  getUserSelectList: params => {
    return http.get(`${base.user}/user/conditionUserList`, params)
  },

  // 查询不是企业主用户列表
  notEtpList: params => {
    return http.get(`${base.user}/user/notEtpList`, params)
  },

  // 导出全部
  exportUser: params => {
    return http.get(`${baseUrl}/exportUser`, params)
  },

  //获取会员该款
  getMemberStatistics: () => {
    return http.get(`${base.user}/statistics/member`)
  },

  //获取会员新增走势
  getMemberTrend: () => {
    return http.get(`${base.user}/statistics/newMember`)
  },

  //获取会员属性数据
  getUserAttribute: () => {
    return http.get(`${base.user}/statistics/userAttribute`)
  },

  //获取平台转化
  getPlatformConversion:()=>{
    return http.get(`${base.user}/statistics/userAttribute`)
  }
}

export default user
